<template>
  <view class="flex justify-between items-center mt-[20rpx] bg-[#fafafa] p-[10rpx] rounded-[8rpx]">
    <view class="text-[#303133] text-[32rpx] font-400 leading-[36rpx] ">
      <text>会员:</text>
      <text class="ml-[10rpx]">{{ member?.nickname }}({{ member?.id }})</text>
    </view>
    <view class="text-[#303133] text-[32rpx] font-400 leading-[36rpx] " @click.stop="toCall(member?.mobile)">
      <uni-icons type="phone" size="16"></uni-icons>
      <text class="ml-[4rpx]">{{ mobileConceal(member?.mobile) }}</text>
    </view>
  </view>
</template>
<script setup lang="ts">
import { mobileConceal } from '@/utils/common'

const props = defineProps({
  member: {
    type: Object,
    default: () => {
      return {
        nickname: '会员名称',
        id: '会员ID',
        mobile: '会员手机号'
      }
    }
  }
})
const toCall = (phoneNumber: any) => {
  console.log(phoneNumber)

  uni.makePhoneCall({
    phoneNumber: phoneNumber //仅为示例
  });
}
</script>